package com.cennac.ccblog.service;

import com.cennac.ccblog.dao.UserMapper;
import com.cennac.ccblog.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Cennac on 16/1/25.
 */
@Service
public class UserService implements IUserService {

    /**
     * 持久层对象
     */
    @Autowired
    protected UserMapper userMapper;

    public List<User> selectAll(){
        return userMapper.selectAll();
    }

    public int addUser(User user){
        return userMapper.insert(user);
    }
}